from common.base import By, webdriver, sleep
from selenium.webdriver.common.keys import Keys

driver = webdriver.Chrome()
driver.maximize_window()
driver.get('https://www.baidu.com')
kw = driver.find_element(By.ID, 'kw')
sleep(2)
kw.send_keys('python')
sleep(2)
# ctrl a
kw.send_keys(Keys.CONTROL, 'a')
sleep(2)
# ctrl x
kw.send_keys(Keys.CONTROL, 'x')
sleep(2)
driver.get('https://www.so.com')
ipt = driver.find_element(By.ID, 'input')
sleep(2)
# ctrl v
ipt.send_keys(Keys.CONTROL, 'v')
sleep(2)
driver.find_element(By.ID, 'search-button').click()
sleep(2)
driver.quit()
